<!DOCTYPE html>
<html>
<head>
	<title>我的签到</title>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<script src="/js/jquery/jquery.min.js"></script>
	<link rel="stylesheet" href="/js/bootstrap/css/bootstrap.min.css">
	<link rel="stylesheet" href="/css/font/css/font-awesome.min.css" />
	<link rel="stylesheet" href="/css/reset.css" />
	<link rel="stylesheet" href="/css/myProfiles.css" />
	<script src="/js/plugins/jrender/jrender.js"></script>
	<link rel="stylesheet" href="/js/plugins/dialog/dialog.css"/>
	<script src="/js/plugins/dialog/dialog.min.js"></script>
	<script type="text/javascript">
        $(function () {
            // 获取当前登陆的user
            var user = JSON.parse(sessionStorage.getItem("user"));
            $(".info").renderValues(user);


            // 发送ajax请求，修改打卡表
            $.get("/attendances/"+user.id,function (data) {
                // 渲染数据
                $(".daka").renderValues(data);
                // 弹窗显示msg
                setTimeout(function () {
                    $(document).dialog({
                        type: "notice",
                        infoText: data.msg,
                        autoClose: 2500,
                        position: "top"
                    });
                }, 100)

            },"json");
        });

	</script>
	<style>
		.data{
			font-weight: bold;
			font-size: 20px;
			color: #ff8a00;
		}

		.text{
			font-size: 12px;
			color: #FF9800;
		}
	</style>
</head>
<body>
	<div class="nav-search">
			<a href="profiles.html">
				<span><i class="fa fa-angle-left fa-2x" ></i></span>
			</a>
	</div>
	<hr/>
<div class="container">
	<div class="row info">
		<div class="col-2" style="margin-right: 25px;">
			<!--<img  class="rounded-circle" src="/img/user/head.jpg">-->
			<img class="rounded-circle" render-src="headImgUrl">
		</div>
		<div class="col-8">
			<h5 ><strong render-html="email"></strong></h5>
			<ul class="list-inline">
				<li class="list-inline-item"><small render-html="place"></small></p></li>
				<li class="list-inline-item"><small render-html="nickName"></small></p></li>
			</ul>
		</div>


	</div>

	<div class="daka">
		<div>
			<p>已连续打卡</p><br>
			<span render-html="conDays" class="data"></span>&nbsp;天
		</div>

		<hr>

		<div>
			<p>我的积分</p><br>
			<span render-html="integral" class="data"></span>&nbsp;分
		</div>
		<hr>
	</div>


	<a href="shop.html">
		<p>进入积分商城</p><span style="color: #ffd350"><i class="fa fa-angle-right fa-2x" ></i></span>
	</a>

	<hr>
	<div class="text">
		打卡规则：<br>
		1.每日签到获得5积分；<br>
		2.连续签到3日，额外获得20积分；<br>
		3.如果签到间断，重先开始计算连续签到时间；<br>
		4.如果连续签到3日，第四天签到回归为连续签到第一天；<br>
		5.可以凭积分到积分商城兑换商品。<br>
	</div>
</div>

<hr />


</body>

</html>